/* Federal University of Minas Gerais (UFMG)
 * Software Engineering Laboratory (LabSoft)
 * SimulES-SPL Project
 */

package br.ufmg.dcc.simulesspl.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * 
 * @author Patrick Prado
 * 
 *         Esta classe possui as propriedades de um cartão projeto.
 * 
 */
public class ProjectCard {

	private String name;
	private int budget;
	private int size;
	
	private static Random random = new Random();
	
	private ProjectCard() {
		this(2 + random.nextInt(3), 20 + random.nextInt(80));
	}

	public ProjectCard(int budget, int size) {
		this("Project", budget, size);
	}
	
	public ProjectCard(String name, int budget, int size) {
		this.name = name;
		this.budget = budget;
		this.size = size;
	}
	
	public String getName() {
		return name;
	}
	
	public int getBudget() {
		return budget;
	}

	public int getSize() {
		return size;
	}

	public static List<ProjectCard> create(int count) {
		List<ProjectCard> result = new ArrayList<ProjectCard>();
		for(int i = 0; i < count; i++) {
			result.add(new ProjectCard());
		}
		return result;
	}

	public static List<ProjectCard> create() {
		List<ProjectCard> result = new ArrayList<ProjectCard>();

		result.add(new ProjectCard("Project A", 2, 20));
		result.add(new ProjectCard("Project B", 3, 40));
		result.add(new ProjectCard("Project C", 3, 60));
		result.add(new ProjectCard("Project E", 5, 99));
		result.add(new ProjectCard("Project D", 4, 75));
		
		return result;
	}

}
